package com.template.common.lang;

public class Const {

    public static class Error {
        public static final String PARAMS_INVALID = "参数异常";
        public static final String USER_NOT_FIND = "用户不存在";
    }

    public static class Cache {
        public static final String TOKEN = "token";
        public static final String TMP_TOKEN = "token:tmp";
        public static final String AUTHORITY = "authorities";
        public static final String PHONE_CODE = "phone-code";
    }

    public static class Header {
        public static final String AUTHORITY = "token";
    }

    public static class Sock {
        public static final String PRINCIPAL = "user";
    }

    public static String cacheTmpToken(Object obj) {
        return Cache.TMP_TOKEN + ":" + obj;
    }

    public static String cachePhoneCode(Object obj) {
        return Cache.PHONE_CODE + ":" + obj;
    }

}
